home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / sys / disktab.h < prev    next >
C/C++ Source or Header  |  1995-02-14  |  3KB  |  82 lines

  1. /*
  2.  * Copyright (c) 1983 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)disktab.h    5.2 (Berkeley) 10/1/85
  7.  * HISTORY:
  8.  * 16-Mar-88  John Seamons (jks) at NeXT
  9.  *    Cleaned up to support standard disk label definitions.
  10.  *
  11.  * 24-Feb-88  Mike DeMoney (mike) at NeXT
  12.  *    Added d_boot0_blkno to indicate logical block number
  13.  *    of "block 0" boot.  This blkno is in d_secsize sectors.
  14.  *    Added d_bootfile to indicate the default operating system
  15.  *    image to be booted by the blk 0 boot.
  16.  *    Changed d_name and d_type to be char arrays rather than ptrs
  17.  *    so they are part of label.  This limits length of info in
  18.  *    /etc/disktab, sorry.
  19.  */
  20.  
  21. #ifndef    _SYS_DISKTAB_
  22. #define _SYS_DISKTAB_
  23.  
  24. /*
  25.  * Disk description table, see disktab(5)
  26.  */
  27. #ifndef KERNEL
  28. #define    DISKTAB        "/etc/disktab"
  29. #endif    !KERNEL
  30.  
  31. #define    MAXDNMLEN    24    // drive name length
  32. #define    MAXMPTLEN    16    // mount point length
  33. #define    MAXFSTLEN    8    // file system type length
  34. #define    MAXTYPLEN    24    // drive type length
  35. #define    NBOOTS        2    // # of boot blocks
  36. #define    MAXBFLEN     24    // bootfile name length
  37. #define    MAXHNLEN     32    // host name length
  38. #define    NPART        8    // # of partitions
  39.  
  40. typedef struct partition {
  41.     int    p_base;        /* base sector# of partition */
  42.     int    p_size;        /* #sectors in partition */
  43.     short    p_bsize;    /* block size in bytes */
  44.     short    p_fsize;    /* frag size in bytes */
  45.     char    p_opt;        /* 's'pace/'t'ime optimization pref */
  46.     short    p_cpg;        /* cylinders per group */
  47.     short    p_density;    /* bytes per inode density */
  48.     char    p_minfree;    /* minfree (%) */
  49.     char    p_newfs;    /* run newfs during init */
  50.     char    p_mountpt[MAXMPTLEN];/* mount point */
  51.     char    p_automnt;    /* auto-mount when inserted */
  52.     char    p_type[MAXFSTLEN];/* file system type */
  53. } partition_t;
  54.  
  55. typedef struct disktab {
  56.     char    d_name[MAXDNMLEN];    /* drive name */
  57.     char    d_type[MAXTYPLEN];    /* drive type */
  58.     int    d_secsize;        /* sector size in bytes */
  59.     int    d_ntracks;        /* # tracks/cylinder */
  60.     int    d_nsectors;        /* # sectors/track */
  61.     int    d_ncylinders;        /* # cylinders */
  62.     int    d_rpm;            /* revolutions/minute */
  63.     short    d_front;        /* size of front porch (sectors) */
  64.     short    d_back;            /* size of back porch (sectors) */
  65.     short    d_ngroups;        /* number of alt groups */
  66.     short    d_ag_size;        /* alt group size (sectors) */
  67.     short    d_ag_alts;        /* alternate sectors / alt group */
  68.     short    d_ag_off;        /* sector offset to first alternate */
  69.     int    d_boot0_blkno[NBOOTS];    /* "blk 0" boot locations */
  70.     char    d_bootfile[MAXBFLEN];    /* default bootfile */
  71.     char    d_hostname[MAXHNLEN];    /* host name */
  72.     char    d_rootpartition;    /* root partition e.g. 'a' */
  73.     char    d_rwpartition;        /* r/w partition e.g. 'b' */
  74.     partition_t d_partitions[NPART];
  75. } disktab_t;
  76.  
  77. #ifndef KERNEL
  78. struct    disktab *getdiskbyname(), *getdiskbydev();
  79. #endif    !KERNEL
  80.  
  81. #endif    _SYS_DISKTAB_
  82.